package com.augurit.common.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 角色功能关联Entity类
 * 
 */
@Entity
@Table(name = "AC_ROLE_FUNC")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AcRoleFunc {

	//属性
	private Long rfId;		//主键ID
	private Long roleId;	//角色ID
	private Long funcId;	//功能ID
	private Long moduleId;	//模块ID
	private Long appId;		//应用ID

	
	@Id
    @SequenceGenerator(name="SEQ_AC_MODULE", sequenceName="SEQ_AC_MODULE", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_AC_MODULE")
	public Long getRfId() {
		return rfId;
	}

	public void setRfId(Long rfId) {
		this.rfId = rfId;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public Long getFuncId() {
		return funcId;
	}

	public void setFuncId(Long funcId) {
		this.funcId = funcId;
	}

	public Long getModuleId() {
		return moduleId;
	}

	public void setModuleId(Long moduleId) {
		this.moduleId = moduleId;
	}

	public Long getAppId() {
		return appId;
	}

	public void setAppId(Long appId) {
		this.appId = appId;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}